package com.epam.submenu.submenu1;

import java.util.ArrayList;
import java.util.List;

import com.epam.menu.Menu;
import com.epam.menu.MenuItem;
import com.epam.submenu.submenu1.submenu1_4.*;

public class Order4 extends MenuItem {
	private final Menu subMenu;
	
	public Order4() {
		super("Fourth-order", "4");
		List<MenuItem> items = new ArrayList<MenuItem>();
		items.add(new AmethystMenu());
		items.add(new QuartzMenu());
		items.add(new RockCrystalMenu());
		items.add(new GoBack1_4());
		subMenu = new Menu(items);
	}

	@Override
	public boolean execute() {
		System.out.println("Fourth-order comand");
		subMenu.run();
		return true;
	}

}
